/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.lecture.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.course.entity.EduCourse;
import vip.xiaonuo.biz.modular.teacher.entity.EduTeacher;
import vip.xiaonuo.common.pojo.CommonEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 开课实体
 *
 * @author ahui
 * @date  2023/05/13 21:21
 **/
@Getter
@Setter
@TableName(value = "EDU_LECTURE", autoResultMap = true)
public class EduLecture implements TransPojo {

    /** ID */
    @TableId
    @ApiModelProperty(value = "ID", position = 1)
    private String id;

    /** 课程id */
    @ApiModelProperty(value = "课程id", position = 2)
    @TableField(insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @Trans(type = TransType.SIMPLE,target = EduCourse.class,fields = {"name", "classHour"},alias = "course",refs = {"courseName", "classHour"})
    private String courseId;

    /** 教师id */
    @ApiModelProperty(value = "教师id", position = 3)
    @TableField(insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @Trans(type = TransType.SIMPLE,target = EduTeacher.class,fields = "name",alias = "teacher",ref = "teacherName")
    private String teacherId;

    /** 人数 */
    @ApiModelProperty(value = "人数", position = 4)
    private Integer size;

    /** 开始周 */
    @ApiModelProperty(value = "开始周", position = 4)
    private Integer fromWeek;

    /** 结束周 */
    @ApiModelProperty(value = "结束周", position = 5)
    private Integer toWeek;

    /** 班级集合 */
    @ApiModelProperty(value = "班级集合", position = 5)
    private String klasses;

    @ApiModelProperty(value = "状态", position = 6)
    @Trans(type = TransType.DICTIONARY, key = "LECTURE_STATE")
    private String state;

    /** 教室类型 */
    @ApiModelProperty(value = "教室类型", position = 7)
    @Trans(type = TransType.DICTIONARY, key = "ROOM_TYPE")
    private String roomType;

    @ApiModelProperty(value = "课程名称", position = 6)
    @TableField(exist = false)
    private String courseName;

    @ApiModelProperty(value = "教师名称", position = 7)
    @TableField(exist = false)
    private String teacherName;

    @ApiModelProperty(value = "课程学时", position = 8)
    @TableField(exist = false)
    private Integer classHour;

    @ApiModelProperty(value = "班级名称", position = 9)
    @TableField(exist = false)
    private String klassName;
}
